package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PsRoomMapper;
import com.ruoyi.system.domain.PsRoom;
import com.ruoyi.system.service.IPsRoomService;
import com.ruoyi.common.core.text.Convert;

/**
 * 通行房间记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-10-29
 */
@Service
public class PsRoomServiceImpl implements IPsRoomService 
{
    @Autowired
    private PsRoomMapper psRoomMapper;

    /**
     * 查询通行房间记录
     * 
     * @param rmId 通行房间记录主键
     * @return 通行房间记录
     */
    @Override
    public PsRoom selectPsRoomByRmId(Long rmId)
    {
        return psRoomMapper.selectPsRoomByRmId(rmId);
    }

    /**
     * 查询通行房间记录列表
     * 
     * @param psRoom 通行房间记录
     * @return 通行房间记录
     */
    @Override
    public List<PsRoom> selectPsRoomList(PsRoom psRoom)
    {
        return psRoomMapper.selectPsRoomList(psRoom);
    }

    /**
     * 新增通行房间记录
     * 
     * @param psRoom 通行房间记录
     * @return 结果
     */
    @Override
    public int insertPsRoom(PsRoom psRoom)
    {
        return psRoomMapper.insertPsRoom(psRoom);
    }

    /**
     * 修改通行房间记录
     * 
     * @param psRoom 通行房间记录
     * @return 结果
     */
    @Override
    public int updatePsRoom(PsRoom psRoom)
    {
        return psRoomMapper.updatePsRoom(psRoom);
    }

    /**
     * 批量删除通行房间记录
     * 
     * @param rmIds 需要删除的通行房间记录主键
     * @return 结果
     */
    @Override
    public int deletePsRoomByRmIds(String rmIds)
    {
        return psRoomMapper.deletePsRoomByRmIds(Convert.toStrArray(rmIds));
    }

    /**
     * 删除通行房间记录信息
     * 
     * @param rmId 通行房间记录主键
     * @return 结果
     */
    @Override
    public int deletePsRoomByRmId(Long rmId)
    {
        return psRoomMapper.deletePsRoomByRmId(rmId);
    }
}
